package org.example.demoblg.model;

import lombok.Data;
import org.springframework.util.unit.DataUnit;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
public class Blog {
    private Integer id;
    private String content;
    private Integer userId;
     private Integer deleteFlag;
     private Date createTime;
     private Date updateTime;
    private String title;

    public String getCreateTime() {

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        return sdf.format(createTime);
    }
}
